<div id="add" class="easyui-dialog" title="问题记录添加" style="width:930px;height:770px;padding:10px"
            data-options="
                iconCls: 'icon-save',
                cls:'dialog',
                closed:true,
                modal:true,
                buttons: '#dlg-buttons'
                ,resizable:true
            ">
        
<form id="add_form" action="__APP__/Home/Posts/add_Posts" enctype="multipart/form-data" method="post" >
	
	<table cellpadding="0" cellspacing="0" class="toolTb">
		    <tr>
		        <td style="border-top:0px;">
		            创建时间：
		            <input class="easyui-datetimebox" name="creatdate" id="creatdate"  style="width:178px;height:26px">
		        </td>
		        <td style="border-top:0px;">
		            班次：
		            <input class="easyui-switchbutton" name="banci" id="banci"  data-options="onText:'白班',offText:'夜班'">
		        </td>
		    </tr>
		    <tr>
		        <td>
		            车型
		            <input class="easyui-textbox" name="cxch" id="cxch" style="width:178px;" data-options="required:true">
		        </td>
		        <td>
		            车型平台
		            <select class="easyui-combobox"  name="pt" id="pt" style="width:178px;height:26px;" data-options=" multiple:false,
		                    panelHeight:'auto'">
		                <option value=""></option>
		                <option value="F3000">F3000</option>
		                <option value="M3000">M3000</option>
		                <option value="X3000">X3000</option>
		                <option value="STR">奥龙</option>
		                <option value="JUN">军车</option>
		                <option value="PZ">偏置码头车</option>
		                <option value="KY">矿用</option>
		                <option value="QT">其他</option>
		            </select>
		        </td>
		        <td>
		            车辆类型：
		            <select class="easyui-combobox" name="cx" id="cx" style="width:178px;height:26px;" data-options=" multiple:false,
		                    panelHeight:'auto'">
		                <option value=""></option>
		                <option value="1">载货车</option>
		                <option value="2">越野车</option>
		                <option value="3">自卸车</option>
		                <option value="4">牵引车</option>
		                <option value="5">专用车</option>
		                
		            </select>
		        </td>
		    </tr>
		    <tr>
		        <td>
		            计生号：
		            <input class="easyui-textbox" name="jsh" id="jsh" style="width:178px;" data-options="required:true">
		        </td>
		        <td>
		            协议号：
		            <input class="easyui-textbox" name="xy" id="xy" style="width:178px;" data-options="required:true">
		        </td>
		        <td>
		            流水号：
		            <input class="easyui-textbox" name="lsh" id="lsh" style="width:178px;" data-options="required:true">
		        </td>
		    </tr>
		</table>





	<div style="margin-bottom:20px">
        <label class="label-top">问题描述:</label>
        <input class="easyui-textbox" name="content" id="content" style="width:100%; height:80px;" data-options="multiline:true">
    </div>
    <div style="margin-bottom:20px">
        <label class="label-top">解决方案:</label>
        <input class="easyui-textbox" name="chuli" id="chuli" style="width:100%; height:80px;" data-options="multiline:true">
    </div>
    <div style="margin-bottom:20px">
    	<label class="label-top">问题分类:</label>
	    <select class="easyui-combobox" name="leibie" id="leibie" style="width:100%;height:26px;" data-options=" multiple:true,panelHeight:'auto'">
	    	<option value=""></option>
	        <option value="ZP">装配</option>
	        <option value="ZL">质量</option>
	        <option value="SJ">设计</option>
	        <option value="GY">工艺</option>
		</select>
    </div>
   
 <!--   <div style="margin-bottom:20px">
	   <label class="label-top" style="width:50%; display:block;">选择文件:</label>
	   <input class="easyui-filebox" name="fj" id="fj" style="width:300px" data-options="buttonIcon:'icon-folder-search',buttonText:''">  
   	</div>  -->
<!-- <div class="uploadpic" style="margin-bottom:20px;">
		 <label class="label-top" style="width:50%; display:block;">图片上传:</label>
		<br/>
		<div class="up-content"><img id="GoodImgPr" src="__PUBLIC__/images/nopic.gif"/>
			<input type="file" name="pics" id="pics"  accept="image/jpeg,image/png,image/jpg" aceonchange="CheckFile(this)" />
		</div>
	</div> -->


<div class="result">
      <notempty name="photos">
          <foreach name="photos" item="vo" >
{$key}|{$vo}
          </foreach>
      </notempty>
</div>


</div>


</form>
<!-- 下部按钮栏 -->
<div id="dlg-buttons">
    <a href="javascript:void(0)" class="easyui-linkbutton" onclick="add()" >确认</a>
    <a href="javascript:void(0)" class="easyui-linkbutton" onclick="javascript:$('#add').dialog('close')">取消</a>
</div>
<script>
function CheckFile(obj) {
    var array = new Array('jpeg', 'png', 'jpg');  //可以上传的文件类型
    if (obj.value == '') {
        alert("请选择要上传的图片!");
        return false;
    }
    else {
        var fileContentType = obj.value.match(/^(.*)(\.)(.{1,8})$/)[3]; //这个文件类型正则很有用：）
        var isExists = false;
        for (var i in array) {
            if (fileContentType.toLowerCase() == array[i].toLowerCase()) {
                isExists = true;
                return true;
            }
        }
        if (isExists == false) {
            obj.value = null;
            alert("上传图片类型不正确!");
            return false;
        }
        return false;
    }
}
$(document).ready(function(){
    var limitNum = 100;
    var pattern = '还可以输入' + limitNum + '字符';
    $('#miaoshu_contentwordage').html(pattern);
    $('#miaoshu_content').keyup(
    function(){
        var remain = $(this).val().length;
        if(remain > limitNum){
                pattern = "字数超过限制！";
            }else{
                var result = limitNum - remain;
                pattern = '还可以输入' + result + '字符';
            }
            $('#miaoshu_contentwordage').html(pattern);
        }
    );
    
    var limitNumB = 255;
    var patternB = '还可以输入' + limitNumB + '字符';
    $('#yuanyin_contentwordage').html(patternB);
    $('#yuanyin_content').keyup(
    function(){
        var remain = $(this).val().length;
        if(remain > limitNumB){
                patternB = "字数超过限制！";
            }else{
                var result = limitNumB - remain;
                patternB = '还可以输入' + result + '字符';
            }
            $('#yuanyin_contentwordage').html(patternB);
        }
    );
    $('#zhenggai_contentwordage').html(patternB);
    $('#zhenggai_content').keyup(
    function(){
        var remain = $(this).val().length;
        if(remain > limitNumB){
                patternB = "字数超过限制！";
            }else{
                var result = limitNumB - remain;
                patternB = '还可以输入' + result + '字符';
            }
            $('#zhenggai_contentwordage').html(patternB);
        }
    );
    
    //显示图片
    // $("#filegood").uploadPreview({ Img: "GoodImgPr", Width: 120, Height: 120 });
});
</script>
